package common.extractText;

import java.util.HashSet;
import java.util.Set;

public class Paragraph {
    static String lineBreak = "⬆⎨".toLowerCase(); // 换行符号

    public static void main(String[] args) {
        Set<String> paragraphSet = getParagraph();
        String str = "vii. IO and endothelial homeostasis in BT Int. abv";


// main
    }

    public static boolean isParagraph(String str, Set<String> paragraphSet) {
        String t = str.toLowerCase().trim();
        if (paragraphSet.contains(t)) {
            return true;
        }
        for (String s : paragraphSet) {
            for (int i = 0; i < 10; i++) {
                if (t.equals(i + " " + s)) {
                    return true;
                }
                if (t.equals(i + ". " + s)) {
                    return true;
                }
            }
            if (t.equals("i. " + s) || t.equals("ii. " + s) || t.equals("iii. " + s) || t.equals("iv. " + s) || t.equals("v. " + s) ||
                    t.equals("vi. " + s) || t.equals("vii. " + s) || t.equals("viii. " + s) || t.equals("ix. " + s) || t.equals("x. " + s)) {
                return true;
            }
        }
        return false;
    }

    // 段落标记符，比如："abstract"，使用中要求必须与文中的完全相等，它的后面不能再有其它字符。
    public static Set<String> getParagraph() {
        Set<String> set = new HashSet<>();
        set.add("abstract");
        set.add("abstract: ");
        set.add("introduction");
        set.add("materials and methods");
        set.add("results");
        set.add("discussion");
        set.add("references");
        set.add("method");
        set.add("conclusion");
        set.add("resumo");
        set.add("descritores");
        set.add("resumen");
        set.add("descriptores");
        set.add("conclusions");
        set.add("methods");
        set.add("background");
        set.add("material and methods");
        set.add("outcome measures");
        set.add("format");
        set.add("preparation");
        set.add("publication");
        set.add("results and discussion");
        set.add("compliance with ethical standards");
        set.add("publisher’s Note");
        set.add("abbreviations");
        set.add("bibliografía");
        set.add("the ht spacetime");
        set.add("null geodesics");
        set.add("chaotic orbits in the ht spacetime");
        set.add("the shadow of a ht spacetime");
        set.add("a b s t r a c t");
        set.add("derivation of theoretical formulas");
        set.add("establishment and validation of the finite element model");
        set.add("analysis of the influencing factors of the brb’s performance");
        set.add("determination of the reduction coefficient and verification of");
        set.add("related work");
        set.add("wrong predictions on background regions");
        set.add("teaching the network about background");
        set.add("study area and methods");
        set.add("discussion: robustness of the multi-linear regression");
        set.add("1. 서 론");
        set.add("2d nanoformulations for drug delivery");
        set.add("2d formulations with biological barriers (bbs)");
        set.add("conclusions and perspectives");
        set.add("research in context");
        set.add("case presentation");
        set.add("caebv of t-cell and nk-cell type, systemic form");
        set.add("ptlds");
        set.add("patients and methods");
        set.add("Pathological and Molecular Features of ALS and FTD");
        set.add("Importance of Immune-Related Kinases in ALS and FTD");
        set.add("Kinases and Immune Signaling in ALS and FTD Pathogenesis");
        set.add("Other Emerging Signaling Kinases in ALS/FTD");
        set.add("Immune Kinase Modulation for ALS and FTD in Disease Managing and in Clinical Trials");
        set.add("Immune Kinase Modulators in the Pipeline towards ALS/FTD Therapy");
        set.add("Concluding Remarks");
        set.add("Biometric Scaling");
        set.add("Spectral Domain Optical Coherence Tomography Imaging");
        set.add("AOSLO Imaging");
        set.add("Sector Analyses");
        set.add("Statistical Analysis");
        set.add("SUPPLEMENTAL MATERIAL");
        set.add("ACKNOWLEDGMENTS");
        set.add("Conflict of Interest");
        set.add("Publisher’s Note");
        set.add("Conclusions");
        set.add("Declarations");
        set.add("Introduction 1");
        set.add("Discussion 1");
        set.add("Conclusions 1");
        set.add("References 1");
        set.add("DATA AVAILABILITY");
        set.add("AUTHOR CONTRIBUTIONS");
        set.add("Author statement ");
        set.add("Ethics approval");
        set.add("ADDITIONAL INFORMATION");
        set.add("COMPETING INTERESTS");
        set.add("ACKNOWLEDGEMENTS");
        set.add("ACKNOWLEDGEMENTS");
        set.add("ACKNOWLEDGEMENTS");
        set.add("ACKNOWLEDGEMENTS");
        set.add("ACKNOWLEDGEMENTS");
        set.add("ACKNOWLEDGEMENTS");
        set.add("ACKNOWLEDGEMENTS");
        set.add("ACKNOWLEDGEMENTS");
        set.add("ACKNOWLEDGEMENTS");

        Set<String> result = new HashSet<>();
        for (String s : set) {
            result.add(s.toLowerCase().replace("  ", " ").trim());
        }
        return result;
    }


}
